var connector = require("../../../src/runtime/jaba");

(function($service$){
var $input$ = {};

/* Init code */

/* Remote code */
var $script$ = 'for product in root.Products do (if ((product.UnitsInStock == 0)) then (g0:product.ProductName; g1:product.ProductID) end; ) end; ';
var $batch$ = $service$.execute($script$, $input$, function($result$) {

/* Local code */
console.log("Sold out products");
$result$.getIteration("product").forEach(function(product){
console.log(((product.getString("g0") + " is sold out! ") + product.getString("g1")));
});

});
})(connector);